package com.ykdl.member.kid.beans;

import java.io.Serializable;
import java.util.ArrayList;

import android.R.bool;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.ykdl.member.kid.models.FileMetas;

import net.wxxr.http.interfaces.IJsonParser;

public class TopicBean implements Serializable ,IJsonParser{

	/**
	 * topic_id": 帖子id
        “source_id”: 来源id (如果是圈子，即为圈子id)
        "source": 来源
        "post_actor_display_name": 发帖人名称
        "title”: 帖子标题
        "post_time": 发帖时间time tick
        "view_count": 浏览次数(保留)
        "reply_count": 回复数
        "digest_level”: 精华等级
        "has_image": 有无图片
        "is_anonymous”: 是否匿名
        "extra_data": 额外信息 { “baby_days”: 宝宝生日,}
		“post_actor”: actor类
	“file_metas”: 附件
	“likes_count”：赞数
	“is_like”: 当前用户是否已赞
	“favorites_count” : 收藏数
	“is_favorite”: 当前用户是否已收藏

	 */
	private static final long serialVersionUID = -1097652873199189832L;
	private String topic_id ;
	private String source_id;
	private String post_actor_display_name;
	private String title;
	private String post_time;
	private String view_count;
	private String reply_count;
	private String source;
	private String is_anonymous ;
	private int digest_level ;//精华级别,1~3
	private int display_order ;//#>0为置顶,<0不显示,==0正常   -1为回收站   -2待审核 -3为被忽略
	private boolean has_image ;
	private ExtraDataBean extra_data ;
	private UserActorBean post_actor ;
	private ArrayList<FileMetas> file_metas;
	private int likes_count ;
	private String favorites_count ;
	private boolean is_favorite ;
	private boolean is_like ;
	private Listinfobean group ;
	private String error ;
	private String desc ;
	public String getDesc() {
		return desc;
	}
	public String getError() {
		return error;
	}

	public String getTopic_id() {
		return topic_id;
	}

	public String getSource_id() {
		return source_id;
	}

	public String getPost_actor_display_name() {
		return post_actor_display_name;
	}

	public String getTitle() {
		return title;
	}

	public String getPost_time() {
		return post_time;
	}

	public String getView_count() {
		return view_count;
	}

	public String getReply_count() {
		return reply_count;
	}

	public String getSource() {
		return source;
	}

	public String getIs_anonymous() {
		return is_anonymous;
	}

	public int getDigest_level() {
		return digest_level;
	}

	public int getDisplay_order() {
		return display_order;
	}

	public boolean isHas_image() {
		return has_image;
	}

	public ExtraDataBean getExtra_data() {
		return extra_data;
	}

	public UserActorBean getPost_actor() {
		return post_actor;
	}

	public ArrayList<FileMetas> getFile_metas() {
		return file_metas;
	}

	public int getLikes_count() {
		return likes_count;
	}

	public String getFavorites_count() {
		return favorites_count;
	}

	public boolean isIs_favorite() {
		return is_favorite;
	}

	public boolean isIs_like() {
		return is_like;
	}

	public Listinfobean getGroup() {
		return group;
	}

	public IJsonParser parse(String json) throws Exception {
		// TODO Auto-generated method stub
		Gson   gson = null;
		if(null != json){
			GsonBuilder b = new GsonBuilder();
			gson  = b.create();
			return gson.fromJson(json, TopicBean.class);
		}
		return null;
	}

}
